import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/baseInformation',
    children:[
      {path: '/baseInformation', component: () => import('../views/InformationManagement/BasicInformation.vue')},
      {path: '/linked', component: () => import('../views/LinkedAccounts/LinkedAccount.vue')},
      {path: '/whiteList', component: () => import('../views/ListManagement/WhiteList.vue')},
      {path: '/grayList', component: () => import('../views/ListManagement/GreyList.vue')},
      {path: '/blackList', component: () => import('../views/ListManagement/BlackList.vue')},
      {path: '/partner', component: () => import('../views/PartnerManagement/PartnerManagement.vue')},
      {path: '/transfer', component: () => import('../views/PermissionManagement/Transfer.vue')},
      {path: '/merge', component: () => import('../views/PermissionManagement/Merge.vue')}
    ]
  },
  {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router